package com.peng._05mvcboot03.pojo.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;


import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 发布文章DTO
 * @Author peng
 * @Date 2024-04-26 17:41
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserArticleDTO {
    @Size(min = 1, max = 20, message = "文章标题长度必须在1到20之间")
    @NotNull(message = "文章标题不能为空")
    private String title;

    @Size(min = 10, max = 500, message = "文章内容长度必须在10到500之间")
    @NotNull(message = "文章内容不能为空")
    private String content;
}
